package com.tuanzi.loan.business.entity.extend;

import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.validator.constraints.NotBlank;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @author lsx
 */
@Data
@Entity
@Table(name = "loan_receipt_extend_info")
public class ExtendInfo implements Serializable {

    private static final long serialVersionUID = -5262830647589395176L;

    @Id
    @Column(name = "id")
    @GeneratedValue(generator = "uuid2")
    @GenericGenerator(name = "uuid2", strategy = "org.hibernate.id.UUIDGenerator")
    private String id;

    // 渠道名称
    @NotBlank
    @Column(name = "channel_name")
    private String channelName;

    // 推广链接
    @Column(name = "extend_url")
    private String extendUrl;

    // 创建时间
    @Column(name = "create_time")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createTime;

    // 创建人
    @Column(name = "create_person")
    private String createPerson;

    // 备注
    @Column(name = "remark")
    private String remark;

    // 子账号用户
    @Column(name = "user_id")
    private String userId;

    // 产品id
    @Column(name = "product_id")
    private Long productId;

    @Transient
    private String productName;

    // 创建用户
    @Column(name = "create_user_id")
    private String createUserId;

    // 短链接码
    @Column(name = "short_link_code")
    private String shortLinkCode;

}
